package com.tyl.service.user;

import com.tyl.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserService {
    //登录判断
    public User login(String userCode,String userPassword);

    //根据用户id修改密码
    public boolean updatePwd(int id, String password);

    //根据用户名或者用户角色查询用户总数
    public int getUserCount(String username,int userRole);

    //根据条件查询用户列表
    List<User> getUserList( String queryUserName, int queryUserRole, int currentPageNo, int pageSize);

    //添加用户
    public boolean addUser(User user);

    //通过用户编码查询用户
    public User getUserCode(String userCode);

    //根据用户ID查询用户
    public User getUserId(String userId) throws SQLException;
    //删除用户
    public int deleteByUserId(Integer userId) throws SQLException;
    //修改用户
    public int updateUser( User user);
}
